package com.bang.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @ClassName: MessageRestController
 * @author: BANG
 * @Date: 2019/12/03 13:51
 * @Version: 1.0
 * @Modified By:
 * @Desc: TODO
 */
@RefreshScope
@RestController
public class MessageRestController {
    @Value("${spring.hello:helloworld}")
    private String message;

    @RequestMapping("/message")
    String getMessage() {
        return this.message;
    }

    @RequestMapping("/message/{point}")
    String getMessage1(@PathVariable("point") String point) {
        return UUID.randomUUID().toString();
    }
}
